﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AiFrame.Base.Core;
using AiFrame.Base.Core.Data.Access;
using AiFrameDemo.Core.DataStore;

namespace AiFrameDemo.Core
{
    public class CoreInitialization
    {
        public static void Initialize()
        {
            // Prepare data for error dialog
            ConfigurationProxy.ApplicationName = "AiFrameDemo";
            ConfigurationProxy.CompanyName = "MyCompany";
            /** You can configure a smtp server for sending error mails, too:
            ConfigurationProxy.ProblemDialogSmtpServer = "smtp.myserver.com";
             */
            
            AiFrame.Base.Core.ConfigurationProxy.SessionManager = NHibernateSessionManager.Instance;
            
            DatabaseConnection.Instance.HostAddress = "localhost";
            DatabaseConnection.Instance.Database = "aiframe_demo";
            DatabaseConnection.Instance.Username = "aiframe";
            DatabaseConnection.Instance.Password = "aiframe";

            DatabaseConnection.Instance.GetSession();
        }
    }
}
